package com.allenyuan.renderobject;

import com.allenyuan.render.Renderer;

public class RenderRectangle extends RenderObject {

	protected RenderPoint point;
	protected int width;
	protected int height;
	
	public RenderRectangle(RenderPoint point, int width, int height) {
		super(RENDER_RECTANGLE);
		this.point = point;
		this.width = width;
		this.height = height;
	}

	public RenderRectangle() {
		super(RENDER_RECTANGLE);
	}

	@Override
	public void draw(Renderer r) {
		// TODO Auto-generated method stub
		r.drawRectangle(point.getX(), point.getY(), width, height);
	}

	public RenderPoint getPoint() {
		return point;
	}

	public void setPoint(RenderPoint point) {
		this.point = point;
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	@Override
	public String toString() {
		return "RenderRectangle [point=" + point + ", width=" + width + ", height=" + height + "]";
	}
	
	@Override
	public boolean contains(RenderPoint point) {
		// TODO Auto-generated method stub
		return super.contains(point);
	}
	
	@Override
	public void move(int x, int y) {
		// TODO Auto-generated method stub
		point.move(x, y);
	}

}
